package main

import "fmt"

func main() {
	a := [8]int{3, 2, 5, 1, 8, 1, 11, 8}
	fmt.Println(a)
	//var testArray [3]int
	//var numArray = [3]int{1, 2}
	//var cityArray = [3]string{"北京", "上海", "深圳"}
	//fmt.Println(testArray) //[0 0 0]
	//fmt.Println(numArray)  //[1 2 0]
	//fmt.Println(cityArray) //[北京 上海 深圳]
	result := sum_int(a)
	fmt.Println(result)
}

func sum_int(arrary [8]int) [8]int {
	for key := range arrary {
		for a := 0; a < len(arrary)-key-1; a++ {
			if arrary[a] > arrary[a+1] {
				arrary[a], arrary[a+1] = arrary[a+1], arrary[a]
			}

		}
	}
	return arrary
}
